<style scoped>
.cc {
  color: red;
}

</style>
<template>
  <Card>
    <div>
      <Row style="text-align:left;">
        <Col span="12">
        <div style="display:flex;">
          <div style="flex: 0 0 80px;line-height:28px;"> 搜索条件： </div>
          <div style="flex:1;">
            <Input v-model="queryObj.content" placeholder="请输入内容">
            <Button slot="append" icon="ios-search" type="info"></Button>
            </Input>
          </div>
        </div>
        </Col>
      </Row>
      <Row style="padding:10px 0;">
        <Col span="12">
        <div style="display:flex;">
          <div style="flex: 0 0 80px;line-height:28px;"> 筛选条件： </div>
          <div style="flex:1;">
            <ButtonGroup>
              <Button type="primary" ghost>冲压机</Button>
              <Button type="primary" ghost>变压器</Button>
              <Button type="primary" ghost>西门子</Button>
            </ButtonGroup>
          </div>
        </div>
        </Col>
      </Row>
      <!--遍历数据区域-->
      <div v-for="(item,key) in devTypeData" :key="key">
        <IconPanel :data-list="item" :title="key"></IconPanel>
      </div>
    </div>
  </Card>
</template>
<script>
  import IconPanel from './IconPanel'
export default {
  components: {IconPanel},
  data: function () {
    let exampleLogo = require('../../../assets/logo.png')
    return {
      value13: '',
      queryObj: {},
      imgObj: {
        default: exampleLogo
      },
      devTypeData: {}
    }
  },
  created: function () {
    this.loadDatas()
  },
  methods: {
    loadDatas: function () {
      window.myapi.dev_icons().then(resp => {
        if (resp.status === 200 && resp.data.status === 200) {
          this.devTypeData = resp.data.data
        }
      }).catch(infos => {
        this.$Notice.warning({
          title: infos
        })
      }).finally(() => {
      })
    },
    show: function (index) {
      this.$Modal.info({
        title: '设备信息',
        content: `类型：${this.data6[index].type}<br>型号e：${this.data6[index].model}<br>编号${this.data6[index].number}`
      })
    },
    remove: function (index) {
      this.data6.splice(index, 1)
    },
    exportData: function () {
      let self = this
      this.$refs.table.exportCsv({
        filename: '设备管理数据',
        columns: this.columns7,
        data: self.data6.map((data, index) => {
          let tem = JSON.parse(JSON.stringify(data))
          tem.createTime = '="' + tem.createTime + '"'
          return tem
        })
      })
    }
  }
}

</script>
